<template>
  <div id="app">
    <keep-alive v-if="iscache">
      <router-view />
    </keep-alive>
    <div v-if="!iscache">
      <router-view />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      iscache: true,
    };
  },
  watch: {
    $route: function (news, old) {
      this.iscache = news.meta.cache;
    },
  },
};
</script>


<style scoped lang="scss">
#app {
  background: #fafafa;
  div{
    height: 100%;
  }
}
</style>
